home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programmer Power Tools
/
Programmer Power Tools.iso
/
progjrn
/
pj_7_3a.arc
/
ESQL.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-04-19
|
934b
|
35 lines
{* LISTING 5 -- SAMPLE PASCAL Embedded SQL syntax *}
{variable declarations}
exec sql
begin declare section;
var in_product_rec : record;
in_product_id : fstring (3);
in_product_price : int32;
in_product_name : fstring (20);
end;
exec sql
end declare section;
{additional Pascal code here}
. . .
begin
in_product_rec.in_product_id := 12;
in_product_rec.in_product_price := 3000;
in_product_rec.in_product_name := "PANTS";
exec sql insert into product
(id , price, name )
values
(:in_product_rec.in_product_id,
:in_product_rec.in_product_price,
:in_product_rec.in_product_name);
end.